// const choice = document.querySelectorAll(".detail_collect_choice span")
// let choiceNumber = 0


// function removeChoice() {
//     choice.forEach(item => {
//         item.classList.remove('.collect_choose')
//     })
// }
// choice.forEach((item, num) => {
//     item.addEventListener('click', function () {
//         choiceNumber = num
//         // changeFocus(num)
//         item[num].classList.remove('.collect_choose')
//     })
// })


// document.querySelectorAll(".detail_collect_choice span").addEventListener("click", function () {
//     this.style.color = "#ff5c38"
// })


// const a = document.querySelector(".detail_collect_choice span")
// a.addEventListener("click", function () {
//     a.style.color = "#ff5c38"
// })

// document.querySelector("detail_left_list div").onclick = function () {
//     this.style.borderRadius = "2px"
//     this.style.backgroundColor = "#fbf2ef"
//     this.style.color = "#ff5c38"
// } 


let token = localStorage.getItem("token")
window.onload = function () {
    // information()
    if (token) {
        userImg = document.querySelectorAll(".user_icon")
        userImg[0].src = "images/user_login_icon.png"
        userImg[1].src = "images/user_login_icon.png"
    }
}


//克隆item节点
document.querySelector(".detail_collect_list").addEventListener("click", function () {
    const detailItem = document.querySelector(".detail_collect_item")
    const cloneItem = detailItem.cloneNode(true)
    cloneItem.children[0].children[0].src = /*"images/choice3.jpg"*/
        cloneItem.children[1].innerHTML =/* "nihao"*/
        document.querySelector(".detail_collect_list").appendChild(cloneItem)
})

document.querySelector(".collect_detail").addEventListener("click", function () {
    document.querySelector(".detail_collect").style.display = "block"

})

// //克隆item节点
// document.querySelector(".detail_collect_list").addEventListener("click", function () {
//     const detailItem = document.querySelector(".detail_collect_item")
//     const cloneItem = detailItem.cloneNode(true)
//     // console.log(cloneItem.children[0].children)
//     cloneItem.children[0].children[0].src = "images/choice3.jpg"
//     // console.log(cloneItem.children[0].children.src)
//     cloneItem.children[1].innerHTML = "nihao"
//     document.querySelector(".detail_collect_list").appendChild(cloneItem)
//     // const changeItem = cloneItem
//     // changeItem
// })
// // < img src = "images/video-canlandeta.jpg" >

// // detail_collect_item